
@extends('common.header') 

<br/><br/><br/><br/><br/>


<div class="col-xs-6 col-sm-1">
</div>

<div class="col-xs-6 col-sm-3" style="text-align:center;">
	<!-- 页面标记 -->
	<mark style="font-size:18px;">栏目列表</mark>
</div>

<div class="col-xs-6 col-sm-8" style="text-align:center;">
	<!-- 搜索框 -->
	<form action="{{ url('/category/index') }}" method='post' >
		<div class="col-lg-6" style="float:left;" >
			<div class="input-group"  >
				
				{{ csrf_field() }}
				
				<input  type="text" name='keyword' style="width:300px;" class="form-control" placeholder="输入栏目名称 进行查询 ...." value="{{ $request or '' }}" />
				<span class="input-group-btn" style="display:block;">
					<input class="btn btn-success" type="submit" value="Go!" />
					<a class="btn btn-default" href="{{ url('/category/index') }}" />清空条件</a>
				</span>
				
			</div>
		</div>
	</form>
</div>



<br/><br/><br/>
	
<div class="col-xs-6 col-md-1">

</div>

<div class="col-xs-12 col-sm-6 col-md-10" style="text-align:right;" >
	<!-- 分类表格 -->
	<div class="bs-example" data-example-id="hoverable-table">
		<table class="table table-hover">
			<thead>
				<tr>
				  <th>id</th>
				  <th>名称</th>
				  <th>创建时间</th>
				  <th><a href="{{ url('/category/create') }}" style="font-size:26px;color:#EE3B3B;">添加</a></th>
				</tr>
			</thead>
			<tbody>
				@forelse($category as $key=> $category_info)
					<tr>
						<th scope="row">{{ $category_info->id }}</th>
						@if ( isset($blank[$key]) )
						<td>
							{{ $blank[$key] }}{{ $category_info->name }}
						</td>
						@else
						<td>
							{{ $category_info->name }}
						</td>
						@endif
						
						<td>{{ $category_info->create_at }}</td>
						<td>
							<a style="color:#008B00;font-size:16px;" href="{{ url('/category/create') }}/{{ $category_info->id }}">		编辑
							</a>
						</td>
					</tr>
				@empty
					<tr>
						<td scope="row"><h2>暂无数据</h2></td>
					</tr>
				@endforelse
			</tbody>
		</table>
	</div>
</div>
<div class="col-xs-6 col-md-1">
</div>


<!-- 分页 -->
<div style='text-align:center;'>
	{{ $category->appends(['keyword'=>$request])->links() }}
</div>
<div class="badge" style="width:100%;text-align:center;font-size:18px;margin-bottom:70px;" >
		共{{ $category->total() }}条数据
</div>


@extends('common.footer')